first crack at implementing some security and different legs