added functionality for setting layout
added tests for layouting