flickering images saved. needs to be tested. library almost integrated