move Surface into lib