a bit refactored

Frame size should be flexible