removes return and fixes access to peripherals