factor positioning code for clarity.