memory is not working porperly